From: Jeroen van der Heijden Date: Fri, 21 Sep 2018 16:18:40 +0000 (+0200) Subject: On Heartbeat interval X-Git-Tag: archive/raspbian/2.0.44-1+rpi1~1^2~3^2~8^2~81 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/success//%22http:/www.example.com/cgi/success/?a=commitdiff_plain;h=b5cfe603afd009fd0f450e5f7e85e2a32ecf418d;p=siridb-server.git On Heartbeat interval --- diff --git a/src/siri/heartbeat.c b/src/siri/heartbeat.c index 6d557889..6ee7dea0 100644 --- a/src/siri/heartbeat.c +++ b/src/siri/heartbeat.c @@ -74,6 +74,12 @@ static void HEARTBEAT_cb(uv_timer_t * handle __attribute__((unused))) { siridb = (siridb_t *) siridb_node->data; + /* flush the buffer, maybe on each insert or another interval? */ + if (siridb_buffer_fsync(siridb)) + { + log_critical("fsync() has failed on the buffer file"); + } + server_node = siridb->servers->first; while (server_node != NULL) { @@ -94,10 +100,5 @@ static void HEARTBEAT_cb(uv_timer_t * handle __attribute__((unused))) siridb_node = siridb_node->next; } - /* flush the buffer, maybe on each insert or another interval? */ - if (siridb_buffer_fsync(siridb)) - { - log_critical("fsync() has failed on the buffer file"); - } }